package com.qianya.system.manage.config;

import com.qianya.system.manage.web.sys.service.ISysParamService;
import com.qianya.system.manage.web.sys.service.ISysSetLimitIpService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ProjecStartUpConfig implements ApplicationRunner {

    @Autowired
    private ISysParamService paramService;
    @Autowired
    private ISysSetLimitIpService limitIpService;
    /**
     * @desc  启动注册项
     * @author lhl
     * @date 2020-07-01 15:51
     * @return
    */
    @Override
    public void run(ApplicationArguments args) throws Exception {
       limitIpService.ipLimitInit();
        paramService.paramCache();
    }
}
